package com.guocheng.modules.login.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.guocheng.base.BaseModel;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 角色实体类
 */
@Data
@TableName("sys_role")
public class Role extends BaseModel {
    //id
    @TableId(type = IdType.AUTO)
    private Integer id;
    //角色名称
    private String name;
    //部门名称
    private String deptName;
    //所属部门
    private Integer deptId;
    //描述
    private String description;
    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    @TableField(exist = false)
    @JsonIgnore
    private List<Menu> menus;
}
